package tma.android.gtasks;

import android.app.Activity;
import android.os.Bundle;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.ArrayAdapter;
import android.widget.Button;
import android.widget.CheckBox;
import android.widget.EditText;
import android.widget.ImageView;
import android.widget.Spinner;

public class Add_task extends Activity{
	Spinner spn_Category, spn_Status;
	EditText edit_title, edit_note;
	ImageView img_due;
	CheckBox chk_remind;
	Button btn_Save, btn_Cancel;
	static final String[] category = new String[] {"Note","Work","Birthday","Family"};
	static final String[] status = new String[] {"Not Completed","Completed"};
	
	OnClickListener click = new OnClickListener() {
		
		@Override
		public void onClick(View v) {
			// TODO Auto-generated method stub
			if(v.getId() == R.id.img_due){
				
			}else if(v.getId() == R.id.btn_Save){
				
			}else if(v.getId() == R.id.btn_Cancel){
				
			}
			
		}
	}; 
	
	@Override
	protected void onCreate(Bundle savedInstanceState) {
		// TODO Auto-generated method stub
		super.onCreate(savedInstanceState);
		setContentView(R.layout.add_task);
		
		spn_Category = (Spinner) findViewById(R.id.spn_category);
		spn_Status = (Spinner) findViewById(R.id.spn_status);
		edit_title = (EditText)findViewById(R.id.edit_title);
		edit_note = (EditText)findViewById(R.id.edit_note);
		img_due = (ImageView)findViewById(R.id.img_due);
		chk_remind = (CheckBox)findViewById(R.id.ckb_remind);
		btn_Cancel = (Button)findViewById(R.id.btn_Cancel);
		btn_Save = (Button)findViewById(R.id.btn_Save);		
		
		ArrayAdapter<String> adap_category = new ArrayAdapter<String>(Add_task.this, android.R.layout.simple_list_item_1,category);
		ArrayAdapter<String> adap_status = new ArrayAdapter<String>(Add_task.this, android.R.layout.simple_list_item_1,status);
		
		spn_Category.setAdapter(adap_category);
		spn_Status.setAdapter(adap_status);
		
		img_due.setOnClickListener(click);
		btn_Save.setOnClickListener(click);
		btn_Cancel.setOnClickListener(click);
	}


}
